﻿using CronExpressionDescriptor;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommonLib.CronHelper
{
    public class CronOp
    {
        /// <summary>
        /// 获取cron的表达式描述
        /// </summary>
        /// <param name="cronString"></param>
        /// <param name="lang">语言 zh-CN  en   ja </param>
        /// <returns></returns>
        public string GetDescription(string cronString,string lang= "zh-CN")
        {
           return ExpressionDescriptor.GetDescription("0-10 11 * * *", new Options()
            {
                DayOfWeekStartIndexZero = false,
                Use24HourTimeFormat = true,
                Locale = lang
           });
        }









    }
}
